﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VoteSystem.DAL;
using VoteSystem.Factory;
using VoteSystem.Model.Models;

namespace VoteSystem.BLL
{
    public class T_CompetitorServices
    {
        private T_CompetitorDAO dao = SessionFactory.CreatDAO<T_CompetitorDAO>();
        public List<T_Competitor> GetT_CompetitorList(int id)
        {
            return dao.GetList(c=>c.ID==id);
        }
        public int Add(T_Competitor model)
        {
            dao.Add(model);
            return Factory.SessionFactory.Save();
        }
    }
}
